<?php
/**
 * User: jewens
 */
class Notify extends MY_Public_Api_Controller
{
    /**
     * 直播开始回调
     */
    public function record_start()
    {    	
    	$json = file_get_contents('php://input');
    	 
    	$data = json_decode($json, true);
    	$json = $data['messageBody'];
    	$data = json_decode($json, true);
    	
    	$this->load->service('direct_seeding/service_direct_seeding_notify');
    	$data = $this->service_direct_seeding_notify->record_start($data);
    	 
    	$this->json_output($data['data'], $data['status']);
    }
    
    /**
     * 直播结束回调
     */
    public function record_stop()
    {
    	$json = file_get_contents('php://input');
    	
    	$data = json_decode($json, true);
    	$json = $data['messageBody'];
    	$data = json_decode($json, true);
    	
    	$this->load->service('direct_seeding/service_direct_seeding_notify');
    	$data = $this->service_direct_seeding_notify->record_stop($data);
    	
    	$this->json_output($data['data'], $data['status']);
    }
}